<template>
	<view class="pageStyle">
		<!-- <g-watermark/> -->
		<web-view :src="urls"></web-view>
	</view>
</template>
<script>
	import {
		Api
	} from "@/utils/Api.js";
	import {
		mapState
	} from "vuex";
	import {
		getDeptCode
	} from "@/utils/commonHeader.js";

	export default {
		data() {
			return {
				describe: "预览",
				urls: "",
			};
		},
		onLoad(options) {
			let records = JSON.parse(options.record);
			console.log('options.record', options.record);
			let previewUrl;
			if (records) {
				previewUrl = records.url;
				uni.setNavigationBarTitle({
					title: records.name
				});
			}

			this.urls = Api.baseUrl + '/' + previewUrl + '?isUniWebview=true';
			console.log('urls', this.urls);
		},
		computed: {
			...mapState(["loginInfo"]),
		},
	};
</script>

<style lang="scss" scoped>
</style>
